﻿/// <summary>
/// <p><b>方法名：</b>ShowMessage</p>
/// <p><b>概要説明:</b>前台画面验证出力消息（共通）</p>
/// <p><b>作者  :</b>李星安</p>
/// <p><b>日期  :</b>2009/07/22</p>
/// <p><b>修正履历:</b></p>
/// </summary>
/// <param type = "string" name = "msgKey">消息出力字段内容</param>
/// <param type = "string" name = "strLoginPw"消息ID</param>
/// <returns type = "UserLoginInfor">消息内容</returns>
function ShowMessage(msgKey, msgId) {
    var strReturnMessage = "";   
    switch (msgId) {
        case "1001":
            strReturnMessage = msgKey+"不能省略！"
            break
        case "1002":
            strReturnMessage = msgKey + "中存在空字符串！"
            break
        case "1003":
            strReturnMessage = msgKey + "输入格式不正确！"
            break
        case "1004":
            strReturnMessage = msgKey + "只能为数字！"
            break
        case "1005":
            strReturnMessage = msgKey + "长度超过范围！"
            break
        case "1006":
            strReturnMessage ="该"+ msgKey + "已存在！"
            break
        case "1007":
            strReturnMessage = msgKey + "不能小于开始日期！"
            break
        case "1008":
            strReturnMessage = msgKey + "部门ID长度固定为2位，请确认！"
            break
        case "1009":
            strReturnMessage = msgKey + "区分ID必须为4位数字，请确认！"
            break
        case "1010":
            strReturnMessage = msgKey + "子区分ID必须为2位数字，请确认！"
            break
        case "1011":
            strReturnMessage = msgKey + "检索数据不存在，请确认！"
            break
        case "1012":
            strReturnMessage = "更新成功！"
            break;
        case "1013":
            strReturnMessage = "更新失败！"
            break;
        case "1014":
            strReturnMessage = "请选择项目成员！"
            break;
        case "1015":
            strReturnMessage = "项目管理员只能有一个！"
            break; 
        case "1016":
            strReturnMessage = "请选择项目范围！"
            break;
        case "1017":
            strReturnMessage = "登录成功！"
            break;
        case "1018":
            strReturnMessage = "登录失败！"
            break;
        case "1019":
            strReturnMessage = "该" + msgKey + "不存在！"
            break
        case "1020":
            strReturnMessage = "请假时间不能大于8小时，如果全天请假请选择休み！"
            break
        case "1021":
            strReturnMessage = "工作时间必须在0-24小时之间，请确认！"
            break
        case "1022":
            strReturnMessage = "请选择审核内容！"
            break
        case "1023":
            strReturnMessage = "取消成功！"
            break
        case "1024":
            strReturnMessage = "取消失败！"
            break
        case "1025":
            strReturnMessage = "删除成功！"
            break
        case "1026":
            strReturnMessage = "删除失败！"
            break
        case "1027":
            strReturnMessage = "邮件发送成功！"
            break
        case "1028":
            strReturnMessage = "邮件发送失败！"
            break
        case "1029":
            strReturnMessage = msgKey + "不能大于100%！"
            break
        case "1030":
            strReturnMessage = "该项目进度信息不存在！"
            break
        case "1031":
            strReturnMessage = "通告发布成功！"
            break
        case "1032":
            strReturnMessage = "邮件发送失败！"
            break
        case "1033":
            strReturnMessage = "输入内容含有非法字符，请确认！"
            break
        case "1034":
            strReturnMessage = msgKey+"不能小于"
            break
        case "1035":
            strReturnMessage = "两次输入的密码不一致，请确认！"
            break
        case "1036":
            strReturnMessage = msgKey + "长度必须为11位手机号，请确认！"
            break
        case "1037":
            strReturnMessage = "身份证格式不正确！"
                 break
        case "1038":
            strReturnMessage =msgKey+ "已存在！"
            break
        case "9999":
            strReturnMessage = msgKey
            break
        case "1038":
            strReturnMessage = "已存在！"
            break
        default:
            strReturnMessage = "消息ID不存在！！！"
            
            break
    }
    return strReturnMessage;
}

/// <summary>
/// <p><b>方法名：</b>AlertMessage</p>
/// <p><b>概要説明:</b>前台画面验证出力消息</p>
/// <p><b>作者  :</b>李星安</p>
/// <p><b>日期  :</b>2009/08/20</p>
/// <p><b>修正履历:</b></p>
/// </summary>
/// <param type = "string" name = "msgKey">消息出力字段内容</param>
/// <param type = "string" name = "msgId"消息ID</param>
/// <returns type = "alert">弹出式消息</returns>
function AlertMessage(msgKey, msgId) {
    alert(ShowMessage(msgKey, msgId));
}

/// <summary>
/// <p><b>方法名：</b>AlertMessage</p>
/// <p><b>概要説明:</b>前台画面验证出力消息</p>
/// <p><b>作者  :</b>李星安</p>
/// <p><b>日期  :</b>2009/08/20</p>
/// <p><b>修正履历:</b></p>
/// </summary>
/// <param type = "string" name = "msgId"消息ID</param>
/// <returns type = "alert">弹出式消息</returns>
function AlertMessage(msgId) {
    alert(ShowMessage("", msgId));
}
